package com.crm.business.crm.controller;


import com.crm.business.crm.service.impl.ICrmDealStatusServiceImpl;
import com.crm.common.crm.constant.CrmCodeEnum;
import com.crm.common.ka.core.common.R;
import com.crm.common.ka.core.common.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/crmDealStatus")
@Api(tags = "CRM更新成交状态模块接口")
public class CrmDealStatusController {

    @Autowired
    private ICrmDealStatusServiceImpl crmDealStatusService;


    @PostMapping("/update")
    @ApiOperation("更新成交状态")
    public Result updateCrmDealStatus() {
        boolean update = crmDealStatusService.update();
        if (update){
            return R.ok();
        }
        return R.error(CrmCodeEnum.CRM_UPDATE);


    }

}
